#ifndef _SYS_FAN_INT_H_
#define _SYS_FAN_INT_H_

#include "FanNum.h"
#include "SysTypes.h"

#define INT_VTABLE(self)   ((FanIntVTable*)self.vtable)


extern Type*    Int_classType;
extern VTable*  Int_classVTable;


/* [sys::Int] Attributes */
struct FanInt
{
  FanNum        super;
};


/* [sys::Int] Virtual-table */
typedef struct FanIntVTable
{
  FanNumVTable  super;
} FanIntVTable;


/* [sys::Int] Methods and fields */
Bool            Int_equals(Obj self, NullableObj obj);
Int             Int_compare(Obj self, Obj obj);
Int             Int_hash(Obj self);
Str*            Int_toStr(Obj self);
Int             Int_defVal(void);
Int             Int_maxVal(void);
Int             Int_minVal(void);
NullableInt     Int_fromStr_1(Str* s);
NullableInt     Int_fromStr_2(Str* s, Int radix);
NullableInt     Int_fromStr(Str* s, Int radix, Bool checked);
Int             Int_random_0(void);
Int             Int_random(Range* r);
Int             Int_negate(Int self);
Int             Int_increment(Int self);
Int             Int_decrement(Int self);
Int             Int_mult(Int self, Int b);
Float           Int_multFloat(Int self, Float b);
Decimal*        Int_multDecimal(Int self, Decimal* b);
Int             Int_div(Int self, Int b);
Float           Int_divFloat(Int self, Float b);
Decimal*        Int_divDecimal(Int self, Decimal* b);
Int             Int_mod(Int self, Int b);
Float           Int_modFloat(Int self, Float b);
Decimal*        Int_modDecimal(Int self, Decimal* b);
Int             Int_plus(Int self, Int b);
Float           Int_plusFloat(Int self, Float b);
Decimal*        Int_plusDecimal(Int self, Decimal* b);
Int             Int_minus(Int self, Int b);
Float           Int_minusFloat(Int self, Float b);
Decimal*        Int_minusDecimal(Int self, Decimal* b);
Int             Int_not(Int self);
Int             Int_and(Int self, Int b);
Int             Int_or(Int self, Int b);
Int             Int_xor(Int self, Int b);
Int             Int_shiftl(Int self, Int b);
Int             Int_shiftr(Int self, Int b);
Int             Int_abs(Int self);
Int             Int_min(Int self, Int that);
Int             Int_max(Int self, Int that);
Int             Int_pow(Int self, Int pow);
Bool            Int_isEven(Int self);
Bool            Int_isOdd(Int self);
Bool            Int_isSpace(Int self);
Bool            Int_isAlpha(Int self);
Bool            Int_isAlphaNum(Int self);
Bool            Int_isUpper(Int self);
Bool            Int_isLower(Int self);
Int             Int_upper(Int self);
Int             Int_lower(Int self);
Bool            Int_isDigit_0(Int self);
Bool            Int_isDigit(Int self, Int radix);
NullableInt     Int_toDigit_0(Int self);
NullableInt     Int_toDigit(Int self, Int radix);
NullableInt     Int_fromDigit_0(Int self);
NullableInt     Int_fromDigit(Int self, Int radix);
Bool            Int_equalsIgnoreCase(Int self, Int ch);
Str*            Int_toLocale_0(Int self);
Str*            Int_toLocale(Int self, Str* pattern);
Bool            Int_localeIsUpper(Int self);
Bool            Int_localeIsLower(Int self);
Int             Int_localeUpper(Int self);
Int             Int_localeLower(Int self);
Str*            Int_toHex_0(Int self);
Str*            Int_toHex(Int self, NullableInt width);
Str*            Int_toChar(Int self);
Str*            Int_toCode_0(Int self);
Str*            Int_toCode(Int self, Int base);
Duration*       Int_toDuration(Int self);
DateTime*       Int_toDateTime_0(Int self);
DateTime*       Int_toDateTime(Int self, TimeZone* tz);
void            Int_times(Int self, Func* c);


/* [sys::Int] Type-system functions */
Type*           Int_initType(void);
VTable*         Int_initVTable(void);
void            Int_initStatic(void);


#endif
